Magnetic field sensors can be used in a variety of applications. In one application, a magnetic field sensor can be used to detect a direction of a magnetic field, more particularly an angle of the direction of a magnetic field. In another application, a magnetic field sensor can be used to sense an electrical current.
Additionally, magnetic field sensors can be configured in a wide variety of manners, including in so-called “open-loop” and “closed-loop” arrangements. In an open-loop arrangement, for example, magnetic field sensors generally sense an angle of the direction of a magnetic field by measuring magnetic induction in an air-gap of a magnetic circuit surrounding a primary magnetic field conductor. In contrast, in a closed-loop arrangement magnetic field sensors generally sense an angle of a direction of a magnetic field by relying on the principle of current compensation in which current generated by a primary magnetic field conductor is compensated by current flow driven through a compensating coil, also known as a secondary coil, by means of an electrical circuit controlled by a magnetic field sensor placed in an air-gap of a magnetic circuit surrounding the primary magnetic field conductor. In such an arrangement, current is driven in a magnetic field generating source until the magnetic field measured by the magnetic field sensor is zero, meaning that the current driven in the magnetic field generating source has fully cancelled the field produced by the current being measured. In particular, the current flowing in the magnetic field generating source is substantially proportional to the magnetic field. In this way, magnetic field sensors configured in a closed-loop arrangement function at the same operating point irrespective of the magnitude of the current being measured such that non-linearity and temperature dependence characteristics of the magnetic field sensor become (ideally) irrelevant to operation of the magnetic field sensor.
One advantage of configuring a magnetic field sensor in a closed-loop arrangement is that in practical magnetic field measurement systems sensitivity changes (ratio change between a small change in an input physical signal to a small change in an output electrical signal) resulting from temperature, stress, etc. do not affect the accuracy of the measured magnetic field as much as they do in an open-loop arrangement. Nonetheless, in very high accuracy applications, even relatively small accuracy deviations (also known as “offset errors”) found in typical closed-loop arrangements can be detrimental to magnetic field measurement.
In certain magnetic field sensors, including those comprising giant magnetoresistance (GMR) elements (i.e., which directly detects magnetic field rather than the rate of change in magnetic field), offset errors can arise due to a phenomenon known as hysteresis, which can also be detrimental to magnetic field measurement. GMR elements, for example, generally do not measure the same output value when a generated magnetic field is cycled up or down, resulting in an offset error. The width of the offset error is typically associated with the hysteresis of the GMR element, with the size of the offset error depending not only upon the amount of hysteresis of the GMR element but also the difference in the polarity and magnitudes of the applied fields that the GMR element was recently exposed to.
In linear magnetic field sensing applications, for example, hysteresis can be especially problematic with the magnetic field sensing elements being extremely sensitive to small changes in magnetic field, especially if the magnetic field to be measured is particularly variable in nature and magnitude. Although there are known systems and methods for reducing hysteresis in a given magnetic field sensing element (e.g., GMR element), the systems and methods can be power consuming and costly and difficult to implement.